var t = getApp();

Page({
    data: {
        nodes: '<p><img src="http://newimg.ap1983.com/img-editor/20210713/01b68159e737438983b09c8a141cb01f.jpg" /></p>',
        safeAreaHeight: 0,
        titleBarTotalHeight: 0,
        titleBarBgColor: "rgba(255,255,255,0);",
        titleBarFontColor: "rgba(0,0,0,0)",
        hideScroll: !1
    },
    onLoad: function(e) {
        this.setData({
            safeAreaHeight: t.global.systemInfo.safeAreaHeight,
            titleBarTotalHeight: t.global.systemInfo.titleBarTotalHeight
        });
    },
    showBuy: function() {
        this.changeScroll(), this.selectComponent("#buy").showPopup();
    },
    showTicket: function() {
        this.selectComponent("#ticket").showPopup();
    },
    showIntegral: function() {
        this.selectComponent("#integral").showPopup();
    },
    showDeliver: function() {
        this.selectComponent("#deliver").showPopup();
    },
    changeScroll: function() {
        this.setData({
            hideScroll: !this.data.hideScroll
        });
    },
    onPageScroll: function(t) {
        var e = t.scrollTop;
        if (e > this.data.titleBarTotalHeight) this.setData({
            titleBarBgColor: "rgba(255,255,255,1);",
            titleBarFontColor: "rgba(0,0,0,1);"
        }); else if (e > 0 < this.data.titleBarTotalHeight) {
            var o = 1 / this.data.titleBarTotalHeight * e;
            this.setData({
                titleBarBgColor: "rgba(255,255,255,".concat(o, ');"'),
                titleBarFontColor: "rgba(0,0,0,".concat(o, ")")
            });
        } else this.setData({
            titleBarBgColor: "rgba(255,255,255,0);",
            titleBarFontColor: "rgba(0,0,0,0);"
        });
    }
});